<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>管理</title>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/css/base.css">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/layui-v2.6.8/layui/css/layui.css">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/layui-v2.6.8/layui/css/layui.css"  media="all">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/css/common.css">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/css/adgoods.css">
    <script src="${pageContext.request.contextPath}/static/layui-v2.6.8/layui/layui.js" charset="utf-8"></script>
    <script src="${pageContext.request.contextPath}/static/layui-v2.6.8/layui/adgoods.js" charset="utf-8"></script>
</head>
<body>
    <!--导航栏-->
    <div class="mnav ">
        <div class="w">
            <div class="logo fl">LOGO</div>
            <div class="mg_lon fr"><a href="#">管理员退出</a></div>
        </div>
    </div>

    <div class="w">
        <div class="layui-tab layui-tab-brief adgood w" lay-filter="docDemoTabBrief">
            <ul class="layui-tab-title ">
                <li class="layui-this">商品</li>
                <li>添加商品</li>
            </ul>
            <div class="layui-tab-content">
                <div class="layui-tab-item layui-show">
                    <form  action="${pageContext.request.contextPath}/deleteStock">
                        <table border=1 align="center" class="good_table">
                            <thead>
                                <th>选择</th>
                                <th>编号</th>
                                <th>产品</th>
                                <th>价格</th>
                                <th>S</th>
                                <th>M</th>
                                <th>L</th>
                                <th>总数</th>
                                <th>图片</th>
                                <th>状态</th>
                                <th>上下架</th>
                                <th>修改</th>
                            </thead>
                            <x:forEach items="${stock}" var="stock">
                                <tr style="text-align: center">
                                    <td ><input type="checkbox" name="stock_id" value="${stock.stock_id}"/></td>
                                    <td ></td>
                                    <td >${stock.product}</td>
                                    <td >${stock.price}</td>
                                    <td >${stock.s}</td>
                                    <td >${stock.m}</td>
                                    <td >${stock.l}</td>
                                    <td >${stock.quantity}</td>
                                    <td ><img src="${pageContext.request.contextPath}/${stock.url}"/></td>
                                    <td >${stock.status}</td>
                                    <form action="${pageContext.request.contextPath}/updateStatus">
                                        <td>

                                            <input type="hidden" name = "id" value = "${stock.stock_id}">
                                            <input type="hidden" name = "status" value = "${stock.status}">
                                            <input type="submit" value="上下架"></td>
                                        </td>
                                    </form>
                                    <td><a href="${pageContext.request.contextPath}/toupdate">修改</a></td>
                                </tr>
                            </x:forEach>
                            <!--<input type="submit" value="删除">-->
                        </table>
                        <input type="submit" value="删除" class="ad_delete">
                    </form>
                </div>
                <div class="layui-tab-item">
                    <br action="${pageContext.request.contextPath}/insertStock" class="ad_good">
                        商品名称：<input type="text" name="product"></br></br>
                        价&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;格：<input type="text" name="price"></br></br>
                        S:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="text" name="s"></br></br>
                        M:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="text" name="m"></br></br>
                        L:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="text" name="l"></br></br>
                        总&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;数：&nbsp;&nbsp;<input type="text" name="quantity"></br></br>
                        图片地址：<input type="text" name="url"></br></br>
                        状&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;态：<input type="text" name="status"></br></br>
                        <input type="submit" value="插入" class="ad_submit"></br>
                    </form>
                </div>
            </div>
        </div>
    </div>
    <div class="clearfix"></div>
</body>
</html>